/* 
 *   WWW.COO8.COM  
 */

package com.gm.memberShip.pay.business.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.gm.memberShip.pay.business.interfaces.ICardManager;
import java.util.*;
import org.apache.commons.lang.StringUtils;
 

import com.gm.memberShip.pay.model.*;
import com.gm.memberShip.pay.persistence.interfaces.*;
import com.gm.memberShip.pay.business.interfaces.*;  

/**
 * @author  JIANGCHENG
 * @version 1.0
 * @since 1.0
 */


 
public class CardManagerImpl   implements ICardManager{

	private ICardDAO cardDAO; 

	public void setCardDAO(ICardDAO dao) {
		this.cardDAO = dao;
	} 

	 
	@Transactional(readOnly=true)
	public Card getById(java.lang.Integer id){
		return cardDAO.getById( id);
	}
	@Transactional
	public void deleteById(java.lang.Integer id){
		cardDAO.deleteById(id);
	}
	 
	@Transactional
	public void save(Card entity){
		cardDAO.save(entity);
	}
	 
	@Transactional
	public void update(Card entity){
		cardDAO.update(entity);
	}
 
	@Transactional(readOnly=true)
   public List<Card> findAll(Map<String, Object> search){
		return cardDAO.findByMap(search);
	}

	@Transactional(readOnly=true)
	public Card getByCardId(java.lang.String v) {
		return cardDAO.getByCardId(v);
	}	
	
}
